﻿using System;
using System.Text;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using BLL;
using System.Data;
using System.IO;
using System.Drawing;
public partial class administrator_uc_admin_e_changepass : System.Web.UI.UserControl
{
    protected void Page_Load(object sender, EventArgs e)
    {        
        if (!IsPostBack)
        {            
            if (!string.IsNullOrEmpty(Request.QueryString["itemid"]))
            {
                hdItemID.Value = Request.QueryString["itemid"].ToString();         
            }
        }
    }       
    protected void lbtEditItem_Click(object sender, EventArgs e)
    {
        try
        {
            string OldPassword= SecurityServices.GetMD5(txtOldPassword.Text.Trim());
            string NewPassword=SecurityServices.GetMD5(txtNewPassword.Text.Trim());
            string GetValueUpdatePass = new CmsBLL().Manager_ChangePass(new Guid(hdItemID.Value),OldPassword, NewPassword);
            lblMessage.Text = GetValueUpdatePass;         
        }
        catch (Exception ex)
        {
            lblMessage.Text = "ERROR! " + ex.Message.ToString();
        }
    }   
}